package com.anti.modular.bus.indexpage.controller;

import com.anti.commom.api.Result;
import com.anti.modular.bus.indexpage.param.CwTjParam;
import com.anti.modular.bus.indexpage.service.BusIndexPageService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Description TODO
 * @Author anTi
 * @Date 2021-6-4
 */
@RestController
@RequestMapping("busIndexPage")
public class BusIndexPageController {
    @Resource
    BusIndexPageService busIndexPageService;


    @GetMapping("getTs")
    public Result getTs() {
        return Result.data(busIndexPageService.getTs());
    }

    @GetMapping("getNowTs")
    public Result getNowTs() {
        return Result.data(busIndexPageService.getNowTs());
    }

    @GetMapping("getTjData")
    public Result getTjData() {
        return Result.data(busIndexPageService.getTjData());
    }

    @PostMapping("cwTjHz")
    public Result cwTjHz(@RequestBody CwTjParam cwTjParam) {
        return Result.data(busIndexPageService.cwTjHz(cwTjParam));
    }

    @PostMapping("cwTj")
    public Result cwTj(@RequestBody CwTjParam cwTjParam) {
        return Result.data(busIndexPageService.cwTj(cwTjParam));
    }
}
